package com.thoughtworks.oo.quantity;

public class Length extends Quantity<Length, LengthUnit> {

    public Length(Integer amount, LengthUnit lengthUnit) {
        super(amount, lengthUnit, Length.class, LengthUnit.class);
    }

    @Override
    public String toString() {
        return toString(new AllUnitsFormatter());
    }

    public String toStringWithBaseUnit() {
        return toString(new BaseUnitFormatter());
    }

    public String toString(Formatter formatter) {
        return formatter.format(amount, unit);
    }

}
